import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import VueLazyload from 'vue-lazyload'

//解决移动端 300ms 点击延迟问题
import fastclick from 'fastclick'

fastclick.attach(document.body);

//初始化默认样式
import './assets/css/base.scss'

//移动端控制台
// import VConsole from 'vconsole'
// const vConsole = new VConsole()
// Vue.use(vConsole)

//Loading 插件
import Loading from "../src/plugin/loading/index"
Vue.use(Loading,{
	title:'数据加载中...'
})

//图片懒加载
Vue.use(VueLazyload, {
	loading: require('./assets/images/loading.png'),
})

//统一管理 meta 标签插件
import MetaInfo from 'vue-meta-info'
Vue.use(MetaInfo)

Vue.config.productionTip = false

new Vue({
	router,
	store,
	render: h => h(App),
	// 预渲染插件添加的代码
  mounted: () => document.dispatchEvent(new Event("x-app-rendered")),
}).$mount('#app')
